package 反射;//本类用于反射
/*学生类：普通属性+普通方法+无参含参构造+toSTring()方法测试==
 */
public class Student {
   public String name;//设置public，获取成员变量
   public   int age;

    public Student() {//无参
    }

    public Student(String name, int age) {//含参
        this.name = name;
        this.age = age;
    }
    public  void eat(){//普通无参方法
        System.out.println("开饭了");
    }
    public void play(int n){//普通含参方法
        System.out.println("我玩了"+n+"好几个小时");
    }
    @Override
    public String toString() {
        return "Student{" +
                "name='" + name + '\'' +
                ", age=" + age +
                '}';
    }
}
